<template lang="pug">
n-config-provider.config__wrapper(:theme="baseConfig.isDark ? darkTheme : null")
  n-loading-bar-provider
    router-view
    n-global-style
</template>

<script setup lang="ts">
// 按需引入推荐
import { onMounted } from "vue";
import {darkTheme} from 'naive-ui'
import {useBaseConfig} from './stores'

const baseConfig = useBaseConfig()

// 移除加载动画
const removeLoading = () => {
  let loadingNode = document.getElementById('Loading')
  if (loadingNode) document.body.removeChild(loadingNode)
}

onMounted(() => {
  removeLoading()
})

</script>

<style lang="scss" scoped>

.config__wrapper {
  width: 100%;
  height: 100%;
}

</style>
